package top.infopub.mgr.mgc.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.mgc.dao.MsgTemplateMainDao;
import top.infopub.mgr.mgc.service.MsgTemplateMainService;
import top.infopub.model.mgc.MsgTemplate;
import top.infopub.model.mgc.MsgTemplateMain;


@Service
public class MsgTemplateMainServiceImpl extends GenericServiceImpl<MsgTemplateMain, String> implements MsgTemplateMainService {

    @Autowired
    private MsgTemplateMainDao msgTemplateMainDao;

    @Override
    public GenericDao<MsgTemplateMain, String> getDao() {
        return msgTemplateMainDao;
    }

    @Override
    public void batchUpdateDelFlag(String[] checkboxId, Integer delDisable) {
        msgTemplateMainDao.batchUpdateDelFlag(checkboxId, delDisable);
    }

    @Override
    public boolean isCodeExist(MsgTemplateMain param) {
        return msgTemplateMainDao.isCodeExist(param) > 0;
    }
    
    @Override
    public MsgTemplate getProtocolByCode(String code) {
        return msgTemplateMainDao.getProtocolByCode(code);
    }
}